package com.ck.ips.service.sys;

import com.ck.common.model.Department;
import com.ck.common.model.OperationResult;
import com.ck.common.page.PageInfo;
import com.ck.ips.model.dto.sys.DepartmentTreeDTO;
import com.ck.ips.model.vo.sys.DepartmentListVO;
import com.ck.ips.model.vo.sys.DepartmentSelectListVO;

import java.util.List;

/**
 * 部门Service
 *
 */
public interface DepartmentService {
	/**
	 * 保存部门
	 *
	 * @param department Department
	 */
	OperationResult insertDepartment(Department department);

	/**
	 * 修改部门
	 *
	 * @param department Department
	 */
	OperationResult updateDepartment(Department department);

	/**
	 * 通过部门ID获取部门
	 *
	 * @param departmentId 部门ID
	 * @return Department
	 */
	Department getDepartmentById(Long departmentId);

	/**
	 * 部门列表
	 *
	 * @param status         状态
	 * @param departmentName 部门名称
	 * @param pageNum        当前页
	 * @param pageSize       每页条数
	 * @return Page<DepartmentListVO>
	 */
	PageInfo<DepartmentListVO> listDepartment(Integer status, String departmentName, Integer pageNum, Integer pageSize);

	/**
	 * 获取所有启用的部门
	 *
	 * @return List<DepartmentSelectListVO>
	 */
	List<DepartmentSelectListVO> listDepartmentSelect();

	/**
	 * 获取部门树列表
	 *
	 * @return List<DepartmentTreeDTO>
	 */
	List<DepartmentTreeDTO> listDepartmentTree();

    /**
     * 禁用启用部门
     * @param status 状态
     * @param departmentId 待操作的部门Id
     * @author linqiang
     */
    OperationResult enableDisableDepartment(Long departmentId,Integer status);

	/**
	 * 删除部门
	 * @param departmentId
	 * @return
	 */
	OperationResult deleteDepartment(Long departmentId);
}
